using HKB.Data.Dal.S_FriendLinkTableAdapters;
using System;
using System.Data;
namespace HKB.Web
{
	public class Shop_FriendLink
	{
		private static readonly pr_GetFriendLinkByShopIDTableAdapter Adapter = new pr_GetFriendLinkByShopIDTableAdapter();
		public DataTable GetFriendLinkByShopID(int ShopID)
		{
			return Shop_FriendLink.Adapter.GetFriendLinkByShopID(new int?(ShopID));
		}
		public void InsertFriendLink(int ShopID, int FriendUserID)
		{
			Shop_FriendLink.Adapter.InsertFriendLink(new int?(ShopID), new int?(FriendUserID));
		}
		public void DeleteFriendLink(int ShopID, int FriendUserID)
		{
			Shop_FriendLink.Adapter.DeleteFriendLink(new int?(ShopID), new int?(FriendUserID));
		}
		public bool ExistFriendLink(int ShopID, int FriendUserID)
		{
			DataTable friendLinkByShopIDFriendUserID = Shop_FriendLink.Adapter.GetFriendLinkByShopIDFriendUserID(ShopID, FriendUserID);
			int count = friendLinkByShopIDFriendUserID.Rows.Count;
			return count > 0;
		}
		public bool IsMaxLink(int ShopID)
		{
			DataTable friendLinkByShopID = Shop_FriendLink.Adapter.GetFriendLinkByShopID(new int?(ShopID));
			int count = friendLinkByShopID.Rows.Count;
			return count > 35;
		}
	}
}
